package ooday01.homework;

public class Teacher extends Person {
    double salary;

    public Teacher() {
    }

    public Teacher(String name, int age, String address, double salary) {
        this.name = name;
        this.age = age;
        this.address = address;
        this.salary = salary;
    }

    void teach() {
        System.out.println("住在" + address + "的" + age + "岁的" + name + "正在上课中，他的工资是" + salary + "元");
    }
}
